package demo;
public class Dog {
    private String name;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public void eat() {
        System.out.println(this.name + " 正在吃饭！");
    }
    public class Test {
        public static void main(String[] args) {
            Dog dog= new Dog();
            dog.setName("阿黄");
        }
    }
}
